package com.gridmobi.xrtb.domain.dsp.common;

import com.google.common.collect.Lists;

import java.util.List;

public class PageResultDTOBak<T> {

	private long total;

	private List<T> rows;

	public PageResultDTOBak() {
	}

	public PageResultDTOBak(long total, List<T> rows) {

		if (!AppConstant.NONERESPONSE) {
			this.total = total;
			this.rows = rows;
		} else {
			this.total = 0;
			this.rows = Lists.newArrayList();
		}

	}

	public long getTotal() {
		if (!AppConstant.NONERESPONSE) {
			return total;
		} else {
			return 0;
		}
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public List<T> getRows() {
		if (!AppConstant.NONERESPONSE) {
			return rows;
		} else {
			return Lists.newArrayList();
		}
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

}
